<?
	session_start();
	
	$ids = isset($_REQUEST['ids'])? $_REQUEST['ids'] : '' ;
	$lang = isset($_REQUEST['lang'])? $_REQUEST['lang'] : 'vn' ;
	
	$kind = isset($_REQUEST['kind'])? $_REQUEST['kind'] : '' ;
	$key = isset($_REQUEST['key'])? $_REQUEST['key'] : '' ;
	$txt = isset($_REQUEST['word'])? $_REQUEST['word'] : '' ;
	$tw = isset($_REQUEST['tw'])? $_REQUEST['tw'] : '' ;
	
	
	if(isset($_REQUEST['pos'])) $_SESSION['pos'] = $_REQUEST['pos'];
		else $_SESSION['pos'] = '-1';
		
	if($tw) $tw="&tw=".$tw;	
	$_SESSION['istype']  = $kind;	
	
	if($key) $_SESSION['keyword'] = $key ;	
	if($txt) $_SESSION['word']    = $txt ;		
	if($kind=="trade"){
		$_SESSION['keyword'] = isset($_REQUEST['key'])? $_REQUEST['key'] : '' ;
	}
	if($lang=='us') $lang='';

	//echo "dss<pre>"; print_r(base64_decode($_SESSION['word'])); die();
	header("Location: search$lang.php?ids=".$ids.$tw);
?>